Page({
    data:{
        title:"深深爱过你",
        time:"2008-11-26",
        singer:"薛之谦",
        url:"http://p1.music.126.net/-5H5FOWBNdfF9rGPmiZZFw==/109951164192399620.jpg?param=177y1772",
        list:[
            {
                id:169198,
                videoSrc:"http://link.hhtjim.com/163/169198.mp3",
                songname:"传说",
                name:"薛之谦",
            },
            {
                id:169200,
                videoSrc:"http://link.hhtjim.com/163/169200.mp3",
                songname:"深深爱过你(前世)",
                name:"薛之谦",
            },
            {
                id:169202,
                videoSrc:"http://link.hhtjim.com/163/169202.mp3",
                songname:"Let You Go",
                name:"薛之谦",
            },
            {
                id:169204,
                videoSrc:"http://link.hhtjim.com/163/169204.mp3",
                songname:"给我的爱人",
                name:"薛之谦",
            },
            {
                id:169207,
                videoSrc:"http://link.hhtjim.com/163/169207.mp3",
                songname:"我们的世界",
                name:"薛之谦",
            },
            {
                id:169210,
                videoSrc:"http://link.hhtjim.com/163/169210.mp3",
                songname:"流星的眼泪",
                name:"薛之谦",
            },
            {
                id:169212,
                videoSrc:"http://link.hhtjim.com/163/169212.mp3",
                songname:"星河之役",
                name:"薛之谦",
            },
            {
                id:169214,
                videoSrc:"http://link.hhtjim.com/163/169214.mp3",
                songname:"深深爱过你(今生)",
                name:"薛之谦",
            },
            {
                id:169216,
                videoSrc:"http://link.hhtjim.com/163/169216.mp3",
                songname:"梦开始的原点",
                name:"薛之谦",
            },
        ]
    },
    tomusic(event) {
        const item = event.currentTarget.dataset.item; // 获取当前点击的数据项
        const { id, videoSrc,songname,name } = item; // 从数据项中解构出
        const { list,url }=this.data
        wx.navigateTo({
            url: `/pages/music/music?id=${id}&videoSrc=${encodeURIComponent(videoSrc)}&songname=${songname}&name=${name}&url=${encodeURIComponent(url)}&list=${encodeURIComponent(JSON.stringify(list))}`,
          });
    }
})